#!/usr/bin/env bash

#使环境变量在项目中生效
loadENV(){
        if [ -f $1 ]
        then
                . $1
        fi
}

loadENV ~/.bashrc
loadENV ~/.bash_profile

#判断PROJECT_HOME是否添加，如果没有则添加
if [ -z "${PROJECT_HOME}" ]; then
  export PROJECT_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi
PROJECT_CONF_DIR=$PROJECT_HOME/conf
#将项目properties文件路径添加到CLASSPATH
for f in $PROJECT_CONF_DIR/*.properties; do
        CLASSPATH=$CLASSPATH:$f;
done

PROJECT_LIB_DIR=$PROJECT_HOME/lib
#将项目所含jar包路径添加到CLASSPATH
for f in $PROJECT_LIB_DIR/*.jar; do
        CLASSPATH=$CLASSPATH:$f;
done
export CLASSPATH

CLASSNAME="com.dec.battery.send.SendMessage"

